#!/bin/bash
#

for old in $(find /opt/test -name "*.txt");do
    new=${old/txt/php} 
    mv $old $new
done
